idf_component_register(SRCS "main2.c" "main.c" "wifi_main.c" "wifi-sta.c" "wifi-ap.c" "web_server.c"
                    PRIV_REQUIRES esp_wifi nvs_flash esp_http_server json vfs
                    INCLUDE_DIRS "."
                    EMBED_TXTFILES "www/index.html" "www/style.css" "www/tailwind.min.css" "www/tailwind-simple-form.css" "www/chart.min.js")

# 为嵌入文件定义变量
# set(embed_txt_files
#     www/index.html
#     www/style.css
#     www/tailwind.min.css
#     www/tailwind-simple-form.css
#     www/chart.min.js
# )

# # 注册组件并嵌入文件
# idf_component_register(
#     SRCS 
#         "main.c"
#         "wifi_main.c"
#         "wifi-sta.c"
#         "wifi-ap.c"
#         "web_server.c"
#     PRIV_REQUIRES 
#         esp_wifi 
#         nvs_flash 
#         esp_http_server 
#         json 
#         vfs
#     INCLUDE_DIRS
#         "."
#     EMBED_TXTFILES 
#         ${embed_txt_files}
# )